Effects/API/jQuery - Sample Code
animate(params, [duration], [easing], [callback])
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="/jquery/js/jquery.js"></script>
<script src="/jquery/js/jquery.easing.js"></script>
<script>
$(document).ready(function(){
$("#animate").click(function(){
$(".block").animate(
{width: "toggle", opacity: "toggle"},
"slow", "easeInQuart"
);
});
});
</script>
<style>
div {
position:absolute;
background-color:#abc;
left:50px;
width:300px;
height:90px;
margin:5px;
}
</style>
</head>
<body>
<button id="animate">animate</button>
<div class="block"></div>
</body>
</html>
[実行結果]